import { RouteRecordPlus } from '@/router/type';

const Layout = () => import('@/layouts/index.vue');

export default [
  /*  {
    path: '/dashboard',
    component: Layout,
    redirect: '/dashboard/base',
    name: 'dashboard',
    meta: { title: '仪表盘', icon: DashboardIcon, auth: () => has.role('ss') },
    children: [
      {
        path: 'base',
        name: 'DashboardBase',
        component: () => import('@/pages/dashboard/base/index.vue'),
        meta: { title: '概览仪表盘', auth: () => has.role('ss') },
      },
      {
        path: 'detail',
        name: 'DashboardDetail',
        component: () => import('@/pages/dashboard/detail/index.vue'),
        meta: { title: '统计报表', auth: () => has.permit('ss') },
      },
    ],
  }, */
  /*  {
    path: '/auth',
    component: Layout,
    redirect: '/auth/user',
    name: 'auth',
    meta: { title: '授权中心', icon: 'lock-on', auth: () => has.role('admin') },
    children: [
      {
        path: 'user',
        name: 'auth-user',
        component: () => import('@/pages/auth/user/List.vue'),
        meta: { title: '用户管理', icon: 'user' },
      },
      {
        path: 'role',
        name: 'auth-role',
        component: () => import('@/pages/auth/role/List.vue'),
        meta: { title: '角色管理', icon: 'usergroup' },
      },
      {
        path: 'org',
        name: 'auth-org',
        component: () => import('@/pages/auth/org/List.vue'),
        meta: { title: '组织机构', icon: 'fork' },
      },
      {
        path: 'post',
        name: 'auth-post',
        component: () => import('@/pages/auth/post/List.vue'),
        meta: { title: '职位管理', icon: 'layers' },
      },
      {
        path: 'menu',
        name: 'auth-menu',
        component: () => import('@/pages/auth/menu/List.vue'),
        meta: { title: '菜单管理', icon: 'bulletpoint' },
      },
      {
        path: 'permit',
        name: 'auth-permit',
        component: () => import('@/pages/auth/permit/List.vue'),
        meta: { title: '权限管理', icon: 'logo-codepen' },
      },
    ],
  }, */
  /*  {
    path: '/general',
    component: Layout,
    redirect: '/general/dict',
    name: 'general',
    meta: { title: '通用资源', icon: 'lock-on', auth: () => has.role('admin') },
    children: [
      {
        path: 'dict',
        name: 'general-dict',
        component: () => import('@/pages/general/dict/List.vue'),
        meta: { title: '数据字典', icon: 'user' },
      },
      {
        path: 'element',
        name: 'general-element',
        component: () => import('@/pages/general/element/List.vue'),
        meta: { title: '网站元素', icon: 'user' },
      },
    ],
  }, */
  // {
  //   path: '/demo',
  //   component: Layout,
  //   redirect: '/demo/nonedemo',
  //   name: 'demo',
  //   meta: { title: 'demo', icon: 'lock-on' },
  //   children: [
  //     {
  //       path: 'nonedemo',
  //       name: 'demo-nonedemo',
  //       component: () => import('@/pages/demo/nonedemo/List.vue'),
  //       meta: { title: 'nonedemo', icon: 'user' },
  //     },
  //     {
  //       path: 'basedemo',
  //       name: 'demo-basedemo',
  //       component: () => import('@/pages/demo/basedemo/List.vue'),
  //       meta: { title: 'basedemo', icon: 'user' },
  //     },
  //     {
  //       path: 'treedemo',
  //       name: 'demo-treedemo',
  //       component: () => import('@/pages/demo/treedemo/List.vue'),
  //       meta: { title: 'treedemo', icon: 'user' },
  //     },
  //   ],
  // },
  {
    path: '/my',
    name: 'my',
    component: Layout,
    redirect: '/my/index',
    meta: { title: '个人页', icon: 'user-circle', sort: 9999 },
    children: [
      {
        path: 'index',
        name: 'user-info',
        component: () => import('@/pages/my/userInfo/index.vue'),
        meta: { title: '个人中心', shared: true, isAlive: true },
      },
    ],
  },
] as RouteRecordPlus[];
